package org.oaix.proxy.cg;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class PersonInterceptor implements MethodInterceptor {


	@Override
	public Object intercept(Object proxy, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
		System.out.println("代理开始...");
		Object data=methodProxy.invokeSuper(proxy,objects);
		System.out.println("代理结束...");
		return data;
	}
}
